<template>
    <div id="userPage">
        <van-cell is-link title="个人信息" to="/userInfo" style="text-align: left;" />
        <van-cell is-link title="已创建的队伍" to="/createTeam" style="text-align: left;" />
        <van-cell is-link title="已加入的队伍"  to="/joinedTeam" style="text-align: left;" />
    </div>
</template>

<style scoped>
</style>

<script setup>
import { ActionSheet } from 'vant';
import { onMounted } from 'vue';
import Myaxios from '../plugins/MyAxios';

onMounted(()=>{
    getUser()
})

const getUser = async ()=>{
    const res = await Myaxios.post("/currentUser");
    if(res.data.code === 402){
        router.push({
            path: '/login',
        });
    }
}

</script>